package timing.ukulele.third.convertor.weixin;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import timing.ukulele.common.data.BaseDataConverter;
import timing.ukulele.data.third.view.weixin.WxUserVO;
import timing.ukulele.third.persistent.weixin.WxUser;


@Mapper
public interface WxUserConverter extends BaseDataConverter<WxUser, WxUserVO> {
    WxUserConverter INSTANCE = Mappers.getMapper(WxUserConverter.class);

    @Override
    @Mappings({
            @Mapping(target = "createBy", ignore = true),
            @Mapping(target = "createTime", ignore = true),
            @Mapping(target = "updateBy", ignore = true),
            @Mapping(target = "updateTime", ignore = true),
    })
    WxUser v2p(WxUserVO vo);

    @Override
    WxUserVO p2v(WxUser po);

}
